<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>go语言<?php echo resource('x_cid', $xcid);?>_golang</title>
    <meta name="keywords" content="go语言<?php echo resource('x_cid', $xcid);?>,"/>
    <meta name="description" content="go语言<?php echo resource('x_cid', $xcid);?>相关技术"/>
    <link rel="stylesheet" type="text/css" href="/assets/auicss/aui.css?v=1" />
    <link rel="stylesheet" href="/assets/css/normalize.css">
    <link rel="stylesheet" href="/assets/css/main.css">
    <style>
        .c{width: 1200px; margin: 0 auto;}
        .c_left{width: 800px; float: left;}
        .c_right{width: 400px; float: right;}
        .footer{clear: both; width: 100%}
        .aui-list{border-top: 0;}
        .main-nav .active{color: #ff7400;}
        .aui-card-list-footer span{font-size: 14px;}
        .aui-card-list-content, .aui-card-list-content-padded{line-height: 30px;}
        .aui-card-list-content-padded{padding: 0 0.75rem; text-indent: 35px;}
        .aui-card-list-header, .aui-card-list-footer{padding: 0 0.75rem; min-height: 2rem;}
        .aui-card-list a{display: block;}
        .aui-card-list a:hover,  a.aui-list-item:hover{background-color: #f0fafb; cursor: pointer;}
        a.aui-list-item{display: block; color: #212121}
        .aui-list .aui-ellipsis-2{display:-webkit-box; font-size: 14px;}
        .aui-card-list-footer .lj{background: none; display: block;}
        .aui-card-list-footer .lj:hover{background: none;}
        .art_title{font-family: -apple-system,SF UI Display,Arial,PingFang SC,Hiragino Sans GB,Microsoft YaHei,WenQuanYi Micro Hei,sans-serif;
            font-size: 18px; font-weight: 700; margin-bottom: 0; padding-bottom: 4px;}
    </style>
</head>
<body>
<!-- header -->
<?php
include_once 'inc_nav.php';
?>
<div class="header-placeholder"></div>
<div class="c">
    <div class="c_left aui-margin-t-15 aui-margin-b-15">
        <section class="aui-content">
            <ul id="js_list" class="aui-list aui-media-list">
                <?include_once 'c_item.php'; ?>
            </ul>
        </section>
    </div>

    <div class="c_right">
        <?php include_once 'inc_right.php'; ?>
    </div>
</div>
<?php
view_include('home/inc_foot');
?>
<script type="text/javascript">
    var offset = 10;
    var is_loading = 0;
    $(document).ready(function () {
        $(window).scroll(function () {
            var bot = 100;
            if ((bot + $(window).scrollTop()) >= ($(document).height() - $(window).height())) {
                load_page();
            }
        });
    });

    function load_page() {
        if( is_loading == 0 ) {
            is_loading = 1;
            // $('#loading').show();
            $.get(
                '<?php echo $base_url; ?>',
                {offset: offset},
                function(data) {
                    if (data == 0) {
                        if (offset == 0) {
                            $('#loading').html('暂没有信息！');
                        } else {
                            $('#loading').html('没有数据了！');
                        }
                    } else {
                        $('#js_list').append(data);
                        offset = offset + 10;
                    }
                    is_loading = 0;
                }
            );
        }
    }
</script>
</body>
</html>